﻿namespace Digitalmes.Domain.Mes;

[SugarTable("prod_wo_schedule", "生产工单排程")]
public class ProdWoSchedule : EntityBase
{
    /// <summary>
    /// 工单Id
    /// </summary>
    [SugarColumn(ColumnDescription = "工单Id")]
    public long WoId { get; set; }

    /// <summary>
    /// 工单
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(WoId))]
    public ProdWo? WorkOrder { get; set; }

    /// <summary>
    /// 工单号
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "工单号", Length = 32)]
    public string? Wo { get; set; }

    /// <summary>
    /// 产线Id
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 产线编号
    /// </summary>
    [NotNull]
    public string? LineCode { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }
}
